package ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.peng.auctionsystem.R;

import Widget.CustomToolBar;
import base.BaseActivity;
import butterknife.Bind;
import butterknife.ButterKnife;

public class BaseTitleBarActivity extends BaseActivity {


    @Bind(R.id.custom_toolbar)
    CustomToolBar customToolbar;

    @Override
    public int getLayoutId() {
        return R.layout.activity_base_title_bar;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        customToolbar.findTextView(R.id.left_tv).setVisibility(View.GONE);
        customToolbar.findImageView(R.id.left_header).setVisibility(View.VISIBLE);
        TextView tvNurse = customToolbar.findTextView(R.id.left_nurse);
        tvNurse.setText("徐丽华");
        tvNurse.setVisibility(View.VISIBLE);

        if (customToolbar != null) {
            customToolbar.findTextView(R.id.center_tv).setText("生命体征");
            customToolbar.findTextView(R.id.right_tv_main).setText("保存");

            customToolbar.findTextView(R.id.center_tv).setText("生命体征");
            customToolbar.findTextView(R.id.left_tv).setText("主页");

            customToolbar.findImageView(R.id.left_header).setVisibility(View.INVISIBLE);
            customToolbar.findTextView(R.id.left_nurse).setVisibility(View.INVISIBLE);

            customToolbar.findTextView(R.id.right_tv_main).setText("保存");
        }
    }
}
